<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <link href="/static/css/bootstrap.css" rel="stylesheet">
    <script type="text/javascript" src="/static/js/jquery-3.2.1.js"></script>
    <script src="/static/js/echarts.js"></script>
</head>
<body>
<center>
<h1>修改页面</h1>
    <form:form action="/update" method="post">
        <input type="hidden" name="id" value="${user.id}"><br>
        用户名:<input type="text" name="username" value="${user.username}"><br>
        密码:<input type="password" name="password" value="${user.password}"><br>
        性别:<input type="radio" name="sex" value="Girl" ${user.sex.id==1?"checked":""}>男
        <input type="radio" name="sex" value="Boy" ${user.sex.id==0?"checked":""}>女<br>
        手机号:<input type="text" name="telephone" value="${user.telephone}">
        <form:errors cssClass="text-danger" path="telephone"></form:errors><br>
        生日:<input type="text" name="birthday" value="<fmt:formatDate value='${user.birthday}' pattern='yyyy-MM-dd'/>">
        <form:errors cssClass="text-danger" path="birthday"></form:errors><br>
        <button>修改</button>
    </form:form>
</center>
</body>
</html>
